import re
s=input().split(",")
ls=[6,7,8,9,10]
arr=list()
for i in s:
    i=eval(i)
    if i>=6 and i<=10:
        arr.append(i)
flag=0
for i in ls:
    if i not in arr:
        if flag:
            print("",i,end='')
        else:
            print(i,end='')
            flag=1